const api = require('../utils/request.js')

module.exports = {
  getBannerList: function () {
    return api.request({
      url: '/wechat/banner/list',
      method: 'GET'
    })
  },
  // 服务设施列表
  serviceFacilities() {
    return api.request({
      url: "/wechat/facility/list"
    })
  },
  // 查询营地
  listCamp: function (data) {
    return api.request({
      url: '/wechat/camp/listCamp',
      method: 'get',
    })
  },
  // 新增营地信息
  addCamp: function (data) {
    return api.request({
      url: '/wechat/camp/addCamp',
      method: 'post',
      data: data
    })
  },

  // 查询营地营位
  listCampsite: function (campId) {
    return api.request({
      url: `/wechat/campsite/list?campId=${campId}`,
      method: 'get',
    })
  },

  //上传营地营位
  addCampsite: function (data) {
    return api.request({
      url: '/wechat/campsite/add',
      method: 'post',
      data: data
    })
  },

  //上传服务设施
  addService(data) {
    return api.request({
      url: "/wechat/facility/add",
      method: "post",
      data
    })
  },

  //营地详情
  campDetail: function (campId) {
    return api.request({
      url: '/wechat/camp/'+campId,
      method: 'get',
    })
  },

  
  serviceFacilitiesSingle:function(campId){
    return api.request({
      url:`/camp/campFacility/list?campId=${campId}`,
      method:'get'
    })
  }
}